import Vue from 'vue'
import VueRouter from 'vue-router'
import ConnectionManager from '../views/ConnectionManager.vue'
import DatabaseExplorer from '../views/DatabaseExplorer.vue'
import QueryEditor from '../views/QueryEditor.vue'
import DataVisualization from '../views/DataVisualization.vue'
import About from '../views/About.vue'
import Settings from '../views/Settings.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/connections'
  },
  {
    path: '/connections',
    name: 'ConnectionManager',
    component: ConnectionManager
  },
  {
    path: '/explorer',
    name: 'DatabaseExplorer',
    component: DatabaseExplorer
  },
  {
    path: '/query',
    name: 'QueryEditor',
    component: QueryEditor
  },
  {
    path: '/visualization',
    name: 'DataVisualization',
    component: DataVisualization
  },
  {
    path: '/about',
    name: 'About',
    component: About
  },
  {
    path: '/settings',
    name: 'Settings',
    component: Settings
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router